<?php
include('sql.php');
if(isset($_GET['id'])){

echo $_GET['id'];
$query = mysql_query('SELECT * from apps WHERE app_id="'.$_GET['id'].'"');
if (!$query) { die('Invalid query: ' . mysql_error()); }
echo "<br>";
while($row = mysql_fetch_array($query))
  {
	echo "<title>" . $row['name'] . "</title>";
	echo "<img border=0 src=" . $row['icon'] . "><br>" . $row['name'] . "<br>";
	echo "<a href=http://apptrackr.org/?act=viewapp&appid=" . $row['app_id'] . " target=_blank>View on AppTrack</a>&nbsp;";
	echo "<br><a href=http://ax.itunes.apple.com/app/id" . $row['app_id'] . "?mt=8 target=_blank>View on iTunes</a>";
	$queryS = mysql_query('SELECT * from screen WHERE app_id="'.$_GET['id'].'"');
	if (!$queryS) { die('Invalid query: ' . mysql_error()); }
	while($rowS = mysql_fetch_array($queryS))
	{
		echo "<br><img src=".$rowS['url'].">";
	}
  }













} else {
exit("Sorry, no apps id");
}
?>
